package com.wow.app.biz.common;

import javax.servlet.http.HttpSession;

public class SessionUtil {

	public static SessionUser getSessionUser(HttpSession httpSession) {
		return (SessionUser) httpSession
				.getAttribute(SessionConstant.USER_LOGIN);
	}

	public static void removeSession(HttpSession httpSession) {
		httpSession.removeAttribute(SessionConstant.USER_LOGIN);
		httpSession.invalidate();
	}

	public static void addSession(HttpSession httpSession,
			SessionUser sessionUser) {
		httpSession.setAttribute(SessionConstant.USER_LOGIN, sessionUser);
	}

}
